package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.RechargeServiceItem;
import cn.wolfcode.crm.query.RechargeServiceItemQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface RechargeServiceItemMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RechargeServiceItem record);

    RechargeServiceItem selectByPrimaryKey(Long id);

    List<RechargeServiceItem> selectAll();

    int updateByPrimaryKey(RechargeServiceItem record);

    List<RechargeServiceItem> queryForList(RechargeServiceItemQueryObject qo);

    List<Map<String,Object>> getService(Long clientId);

    Integer getBeforeCount(@Param("clientId") Long clientId,@Param("serviceName") String serviceName);

    void insertRelation(@Param("clientId") Long clientId,
                        @Param("serviceName") String serviceName,
                        @Param("sum") Integer sum);
    void updateRelation(@Param("clientId") Long clientId,
                        @Param("serviceName") String serviceName,
                        @Param("sum") Integer sum);
}